<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.*" %>
<%@ page import="org.jbpm.graph.def.*" %>
<%@ page import="org.jbpm.graph.exe.*" %>
<%@ page import="org.jbpm.db.*" %>
<%@ page import="org.jbpm.*" %>
<%@ page import="com.gzgi.workflow.jbpm.model.*" %>
<%@ page import="com.gzgi.workflow.jbpm.datafield.*" %>
<%@ page import="com.gzgi.workflow.jbpm.context.*" %>
<%@ page import="com.gzgi.workflow.jbpm.service.*" %>
<%@ page import="com.gzgi.workflow.jbpm.container.*" %>
<%@ page import="com.gzgi.framework.util.*" %>
<%@ page import="org.apache.commons.lang.*" %>
<%@ page import="EDU.oswego.cs.dl.util.concurrent.Semaphore" %>
<%@ include file="/pages/system/checkAdmin.jsp"%>
<%
        RequestUtil.setRequestParameterToAttribute(request);
        String processInstanceId = request.getParameter("processInstanceId");
        String taskName = request.getParameter("taskName");
		String actorId = request.getParameter("actorId");
		

		try {
			  if(processInstanceId != null && taskName != null && actorId != null){
				  Set actorIds = new HashSet();
				  StringTokenizer token = new StringTokenizer(actorId, ",");
				  while (token.hasMoreTokens()) {
					  String str = token.nextToken();
					  actorIds.add(str);
				  }
				  System.out.println("actorIds:"+actorIds);
                  ProcessContainer.getContainer().reassignTask(processInstanceId, taskName, actorIds);
			  }
		}catch (Exception ex) {
			ex.printStackTrace();
			throw new org.jbpm.JbpmException(ex);
		}
%>

<script language="JavaScript">
    function submitForm(){
		document.iForm.bt01.disabled=true;
        document.iForm.submit();
     }
</script>
<center>
<form name="iForm" method="post" action="">
    processInstanceId&nbsp;<input type="text" id="processInstanceId" name="processInstanceId" size="50"  value=""><br>
    taskName&nbsp;<input type="text" id="taskName" name="taskName"  size="50"  value=""><br>
	actorIds&nbsp;<input type="text" id="actorId" name="actorId" size="50"  value=""><br>
	<input type="button" name="bt01" value="确定" onclick="submitForm();">
</form>
</center>
